package com.util;
import org.apache.spark.sql.SparkSession;

/**
 * Created by Administrator on 2017/4/3.
 */
public class HiveSqlUtil {
    public static SparkSession getSparkSession(){

        SparkSession spark = SparkSession
                .builder()
                .appName("Java Spark Hive Example")
                .master("local[*]")
                .config("spark.sql.warehouse.dir","hdfs://120.79.34.45:9000//user/hive/warehouse")
                .enableHiveSupport()
                .getOrCreate();

        return spark;
    }
}